<template>
<p>{{ msg }}</p>
<ChildCom :title="msg" @change="childChange"/>
</template>

<script>
import ChildCom from './ChildCom.vue';
export default{

    components:{
        ChildCom
    },

    data(){
        return{
            msg:"这是父组件的内容"
        }
    },
    methods:{
        childChange(value){
            console.log("value",value);
            console.log(this.msg);
            this.msg = value
        }
    }
}
</script>